body {
    /* background: #f2f2f2; */
    background: #282c34;
}

.frame {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 400px;
    height: 400px;
    margin-top: -200px;
    margin-left: -200px;
    border-radius: 2px;
    box-shadow: 1px 2px 10px 0px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    background: #333;
    color: #fff;
    font-family: 'Open Sans', Helvetica, sans-serif;
}

.text {
    position: absolute;
    width: 100%;
    text-align: center;
    top: 145px;

    h1,
    h2 {
        font-size: 60px;
        line-height: 60px;
        text-transform: uppercase;
        font-weight: 700;
        margin: 0;
        transition: all 1s ease-in-out;
        transform: translateX(0);
        text-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
    }
    h2 {
        font-size: 40px;
        line-height: 40px;
    }
}

.slices {
    position: absolute;
    width: 400px;
    height: 400px;
    background: url(./slice-image-1.jpg) center center no-repeat;
    background-size: 400px 400px;
    cursor: pointer;

    .slice {
        position: relative;
        z-index: 2;
        float: left;
        box-sizing: border-box;
        width: 50px;
        height: 400px;
        background: url(./slice-image-2.jpg) center center no-repeat;
        background-size: 400px 400px;
        transition: all 1s ease-in-out;

        background-position: calc(-50px * var(--i)) 0;
        transform: translateY(-40px);
        opacity: 0;

        &:nth-child(odd) {
            transform: translateY(40px);
        }
    }

    &:hover {
        h1 {
            transform: translateX(-40px);
        }
        h2 {
            transform: translateX(40px);
        }
        .slice {
            transform: translateY(0);
            opacity: 1;
        }
    }
}
